package com.helen.ui.applymerchent.entity;

import com.contrarywind.interfaces.IPickerViewData;

import java.util.List;

/**
 * Created by yang on 2019/5/21
 */
public class AddNewRecoveryEntity implements IPickerViewData {

        /**
         * id : 1
         * name : 安徽省
         * sub : [{"id":2,"name":"合肥市","sub":[{"id":3,"name":"包河区"},{"id":6,"name":"瑶海区"}]}]
         */
        @Override
        public String getPickerViewText() {
            return this.name;
        }
        private int id;
        private String name;
        private List<SubBeanX> sub;

    public AddNewRecoveryEntity(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<SubBeanX> getSub() {
            return sub;
        }

        public void setSub(List<SubBeanX> sub) {
            this.sub = sub;
        }

        public static class SubBeanX implements IPickerViewData {
            public SubBeanX(int id, String name) {
                this.id = id;
                this.name = name;
            }

            @Override
            public String getPickerViewText() {
                return this.name;
            }

            /**
             * id : 2
             * name : 合肥市
             * sub : [{"id":3,"name":"包河区"},{"id":6,"name":"瑶海区"}]
             */

            private int id;
            private String name;
            private List<SubBean> sub;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public List<SubBean> getSub() {
                return sub;
            }

            public void setSub(List<SubBean> sub) {
                this.sub = sub;
            }

            public static class SubBean implements IPickerViewData{
                /**
                 * id : 3
                 * name : 包河区
                 */

                private int id;
                private String name;

                @Override
                public String getPickerViewText() {
                    return this.name;
                }

                public SubBean(int id, String name) {
                    this.id = id;
                    this.name = name;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }
        }
    }
}
